// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SerializeCultureInfo.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   SilverlightSerializer definition for system namespace class - CultureInfo
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Serialization.Helpers
{
    using System.Globalization;
    using global::Serialization;

    [Serializer(typeof(CultureInfo))]
    public sealed class SerializeCultureInfo : ISerializeObject
    {
        public object[] Serialize(object target)
        {
            return new object[] { target.ToString() };
        }

        public object Deserialize(object[] data)
        {
            return new CultureInfo((string)data[0]);
        }
    }
}